package com.quasar.hpatient.bean.home_all;

import com.quasar.hpatient.R;

import lib.quasar.recycler.model.MultModel;

public final class AllItemBean implements MultModel {

    private String record_value = "";
    private String record_date = "";
    private String record_datetime = "";
    private String record_name = "";
    private String record_dose = "";
    private String record_type = "";
    private String record_systolic = "";
    private String record_diastolic = "";
    private String record_input = "";
    private String record_output = "";
    private String record_night = "";

    public String getRecord_type() {
        return record_type;
    }

    public void setRecord_type(String record_type) {
        this.record_type = record_type;
    }

    public String getRecord_value() {
        return record_value;
    }

    public void setRecord_value(String record_value) {
        this.record_value = record_value;
    }

    public String getRecord_datetime() {
        return record_datetime;
    }

    public void setRecord_datetime(String record_datetime) {
        this.record_datetime = record_datetime;
    }

    public String getRecord_dose() {
        return record_dose;
    }

    public void setRecord_dose(String record_dose) {
        this.record_dose = record_dose;
    }

    public boolean isInput() {
        return "入量".equals(record_name);
    }

    public boolean isOutput() {
        return "白天尿量".equals(record_name);
    }

    public boolean isNight() {
        return "夜尿量".equals(record_name);
    }

    public String getRecord_name() {

        if ("json_other_height".equals(record_name)) {
            return "身高";
        } else if ("json_other_weight".equals(record_name)) {
            return "体重";
        } else if ("json_other_bmi".equals(record_name)) {
            return "BMI";
        } else if ("json_other_sleep_time".equals(record_name)) {
            return "睡眠量";
        } else if ("json_other_amount_exercise".equals(record_name)) {
            return "运动量";
        } else if ("json_other_traffic".equals(record_name)) {
            return "引流量";
        } else {
            return record_name;
        }
    }

    public void setRecord_name(String record_name) {
        this.record_name = record_name;
    }

    public String getRecord_date() {
        return record_date;
    }

    public void setRecord_date(String record_date) {
        this.record_date = record_date;
    }

    public String getInput() {
        return record_value;
    }

    public void setInput(String input) {
        this.record_value = input;
    }

    @Override
    public int getMultType() {
        if ("体温".equals(record_name) || "血压".equals(record_name)
                || "血糖".equals(record_name) || "心率".equals(record_name)
                || "总入量".equals(record_name) || "总出量".equals(record_name) || "夜尿量".equals(record_name) || "json_other_bmi".equals(record_name)) {
            return MultModel.TYPE_1;
        } else {
            return MultModel.TYPE_2;
        }
    }

    public int getColor() {
        if ("引流量".equals(getRecord_name()) || "血糖".equals(getRecord_name())) {
            return R.color.color_black;
        } else {
            return R.color.color_font_gray60;
        }
    }

    public String getKey() {
        return record_name;
    }

    public void clear() {
        this.record_value = "";
    }

    public boolean isBig() {

        final String record_name = getRecord_name();

        return "体温".equals(record_name) ||
                "血压".equals(record_name) ||
                "血糖".equals(record_name) ||
                "心率".equals(record_name) ||
                "总入量".equals(record_name) ||
                "总出量".equals(record_name) ||
                "夜尿量".equals(record_name);
    }

    public boolean isLongPress() {
        final String record_name = getRecord_name();
        return "引流量".equals(record_name) || "血糖".equals(record_name);
    }

    public String getBloodpressure() {
        return record_systolic + "/" + record_diastolic;
    }

    public String getRecord_input() {
        return record_input;
    }

    public void setRecord_input(String record_input) {
        this.record_input = record_input;
    }

    public String getRecord_output() {
        return record_output;
    }

    public void setRecord_output(String record_output) {
        this.record_output = record_output;
    }

    public String getRecord_night() {
        return record_night;
    }

    public void setRecord_night(String record_night) {
        this.record_night = record_night;
    }
}
